package uit.v_t.file_transfer;

import android.app.Activity;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.os.Bundle;
import android.os.CountDownTimer;

public class WelcomeScreen extends Activity {

	ConnectivityManager connectManager;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.welcome_layout);
        MainCountDown countDown = new MainCountDown(2000, 2000);
		countDown.start();
    }
    
    protected class MainCountDown extends CountDownTimer{

		public MainCountDown(long millisInFuture, long countDownInterval) {
			super(millisInFuture, countDownInterval);
			// TODO Auto-generated constructor stub
		}
		
		@Override
		public void onFinish() {
			// TODO Auto-generated method stub
			startMain();
		}

		@Override
		public void onTick(long millisUntilFinished) {
			// TODO Auto-generated method stub
			
		}
	}

    protected void startMain() {
		Intent intent =  new Intent(getApplicationContext(), MainActivity.class);
		startActivity(intent);
		finish();
	}
	
	protected void onDestroy() {
		super.onDestroy();
		System.gc();
	}
    
}
